package com.example.springbootfastjson2;

import java.util.List;


/**
 * @program: springboot-fastjson2
 * @description: 实体类
 * @author: XianJin.Lu
 * @create: 2021-09-03 09:24
 **/
public class Teacher {
    private Integer id;
    private String name;
    private String info;
    private List<Student> studentList;

    public static class Student {
        private String id;
        private String name;
        private String student_num;

        @Override
        public String toString() {
            return "Student{" +
                    "id='" + id + '\'' +
                    ", name='" + name + '\'' +
                    ", student_num='" + student_num + '\'' +
                    '}';
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getStudent_num() {
            return student_num;
        }

        public void setStudent_num(String student_num) {
            this.student_num = student_num;
        }

        public Student(String id, String name, String student_num) {

            this.id = id;
            this.name = name;
            this.student_num = student_num;
        }
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", info='" + info + '\'' +
                ", studentList=" + studentList +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public List<Student> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<Student> studentList) {
        this.studentList = studentList;
    }

    public Teacher(Integer id, String name, String info, List<Student> studentList) {

        this.id = id;
        this.name = name;
        this.info = info;
        this.studentList = studentList;
    }
}
